import request from "@/utils/request.ts";
import type {TradeMarkType,TradeMark} from "./type.ts";

export const getTradeMark = (page: number, limit: number) => request.get<any, TradeMarkType>(`/admin/product/baseTrademark/${page}/${limit}`)

export const addOrUpdateTradeMark = (data:TradeMark)=>{
    if (data.id) {
        return request.post("/admin/product/baseTrademark/update",data);
    } else {
        return  request.post("/admin/product/baseTrademark/save",data);
    }
}

export const deleteTradeMarkAPI = (id:number) => request.delete("/admin/product/baseTrademark/remove/"+id);